package cn.koala.key.api;

import cn.koala.key.accounts.util.AuthFunAndModule;
import cn.koala.key.common.feign.BaseApi;
import cn.seed.common.core.Result;
import feign.Param;
import feign.RequestLine;

import java.util.List;

/**
 * 权限api
 * @description
 * @return
 * @Exception
 * @author shuai.xu
 * @time 2019/6/27 10:58
*/
public interface AuthApi extends BaseApi {

    /**
     * 获取权限列表
     * @description getAuthTreeByName
     * @param systemCode
     * @param userCode
     * @return cn.seed.common.core.Result<java.lang.Object>
     * @Exception
     * @author shuai.xu
     * @time 2019/6/27 10:59
    */
    @RequestLine("GET /auth/funAuthTree?systemCode={systemCode}&userCode={userCode}")
    Result<Object> getAuthTreeByName(@Param("systemCode")String systemCode, @Param("userCode") String userCode);

    /**
     * 根据工号获取模块Id获取按钮权限
     * @description getAuthBtnAuth
     * @param systemCode
     * @param userCode
     * @param moduleId
     * @return cn.seed.common.core.Result<java.util.List<cn.koala.key.accounts.util.AuthFunAndModule>>
     * @Exception
     * @author shuai.xu
     * @time 2019/6/27 10:59
    */
    @RequestLine("GET /auth/btnAuth?systemCode={systemCode}&userCode={userCode}&moduleId={moduleId}")
    Result<List<AuthFunAndModule>> getAuthBtnAuth(@Param("systemCode") String systemCode,
                                                  @Param("userCode") String userCode,
                                                  @Param("moduleId") String moduleId);
}
